<template>
  <div class="card">
    <h1>首页</h1>
    <p>欢迎来到我的 Vue 3 应用！</p>
    <HelloWorld msg="计数器示例" />
    <router-link to="/about" class="btn">跳转到关于页</router-link>
  </div>
</template>

<script setup>
import HelloWorld from '../components/HelloWorld.vue'
</script>

<style scoped>
.card {
  background: white;
  border-radius: 10px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
  padding: 40px 30px;
  max-width: 500px;
  width: 100%;
  text-align: center;
  transition: transform 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

.btn {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #42b983;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: #36976b;
}
</style>